package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import net.wxxr.http.interfaces.IJsonParser;

public class IndexBean implements Serializable, IJsonParser{

	/**
	 * 
    "articles": [
        {
            "url": "http://imgs.ykdllmyr.com/articles/2014/5/6/UE59xKcSpL92GGgtUtzktc.png",
            "article_id": 4,
            "title": "柿子三个食用须知"
        }
    ],
    "hot_topics": [
        {
            "views_count": 46,
            "topic_title": "拉拉啦",
            "actor": {
                "avatar_url": "http://imgs.ykdllmyr.com/groups/2014/10/10/UXXxSBAB2DFdViLHL57JmM.png",
                "display_name": "阿拉彬",
                "actor_id": 195
            },
            "topic_id": 150,
            "replies_count": 4,
            "group_id": 1
        }
    ],
    "top_ad_items": [
        {
            "url": "http://imgs.ykdllmyr.com/aditems/2014/12/30/iTk4zCmi2NjkVWQ9Ts8c6E.jpeg",
            "action": "http://www.baidu.com"
        }
    ]
    "invitation_stores": {
        "can_join_stores_num": 3,
        "store_list": [
            {
                "store_id": 100100268,
                "name": "逗比的门店" 
            }
        ]
    },
}
	 */
	private static final long serialVersionUID = -4125105576525985167L;
	private  ArrayList<ArticleBean>  articles = new ArrayList<ArticleBean>();
	private  ArrayList<Hot_TopicsBean>  hot_topics= new ArrayList<Hot_TopicsBean>();
	private  ArrayList<Top_ad_ItemsBean>  top_ad_items= new ArrayList<Top_ad_ItemsBean>();
	private StoreInfoBean random_store;
	private IndexRandomBean random_exchange_gift;
	private ProductBean random_product;
	private String random_lottery_prize;
	private Invitation_StoresBean invitation_stores ;
	public Invitation_StoresBean getInvitation_stores() {
		return invitation_stores;
	}
	public StoreInfoBean getRandom_store() {
		return random_store;
	}
	public IndexRandomBean getRandom_exchange_gift() {
		return random_exchange_gift;
	}
	public ProductBean getRandom_product() {
		return random_product;
	}
	public String getRandom_lottery_prize() {
		return random_lottery_prize;
	}
	public ArrayList<ArticleBean> getArticles() {
		return articles;
	}
	public ArrayList<Hot_TopicsBean> getHot_topics() {
		return hot_topics;
	}
	public ArrayList<Top_ad_ItemsBean> getTop_ad_items() {
		return top_ad_items;
	}
	@Override
	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, IndexBean.class);
		}
		return null;
	}

}
